<% if @webhook.errors.any? %>
  $('#alert p').html("<%= escape_javascript(@webhook.errors.full_messages.join('<br/>')) %>");
  $('#alert').fadeIn();
<% else %>
  $("#webhook_<%= @webhook.id %>").remove();
  $('#alert p').html("Webhook '<%= @webhook.host %>' has been removed successfully");
  $('#alert').fadeIn();
<% end %>
